package demo02方法的定义和调用;

public class Demo03 {
    public static void main(String[] args) {

        int max =max(10, 10);
        System.out.println(max);
    }


    //比大小
    public static int max(int num1,int num2){

        int result = -1;

        if (num1 > num2){
            result = num1;
        }else if (num2 > num1){
            result = num2;
        }else {
            System.out.println("num1 == num2");
            return 0;//中止方法
        }

        return  result;
    }
}
